package tankgame01;

public class ShotRun extends Thread{
    EnemyTank enemyTank;

    public ShotRun(EnemyTank enemyTank) {
        this.enemyTank = enemyTank;
    }

    @Override
    public void run() {
        while(true){
            try {
                Thread.sleep(700);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            enemyTank.shot();
        }
    }
}
